<?php
    require('config/config.php');
    include('header.php');
	
	$infoService = Service::getServiceFromMachine();
	
?>

        <!-- Header -->
    <header class="container_12 " id="header">
        <div class="grid_3 alpha">
            <img src="./stylesheets/images/logo1.png" alt="Logo"/>
        </div>
<?php
    require 'tableauCriticite.php';
?>
    </header>
    <!-- End Header -->
    <!-- Content -->
    <div class="clear"></div>
    <section class="content">
<?php
    require 'menu.php';
?>
    <div>
         <table class="tabInfos">
            <caption>Détails par Service</caption>
            <thead>
                <tr>
                  <th>Service</th>
                  <th>Nombre de machines</th>
                  <th>Description du service</th>
                </tr>
            </thead>
            <tbody>
<?php
				foreach($infoService as $service){
					echo '<tr>';
					echo '<td>'.$service['nom'].'</td>';
					echo  '<td><a href="serviceMachines.php?serviceId='.$service['sId'].'">'. $service['nb'] .'</td>';
					echo '<td><p>'. $service['descS'] .'</p></td>';
				}
?>			
            </tbody>
        </table>
    </div>
</section>
    <!-- End Content>
    <!-- Footer -->
<?php
    include 'footer.php';
 ?>
    <!-- End Footer -->
</body>
</html>